package io.geekidea.boot.test.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 消费记录
 *
 * @author geekidea
 * @since 2025-03-26
 */
@Data
@TableName("pay_record")
@Schema(description = "消费记录")
public class PayRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "业务id，具体业务的id")
    private String sourceId;

    @Schema(description = "交易类型，0：购卡，1：充值; 2：退款等")
    private Boolean dealType;

    @Schema(description = "交易时间")
    private Date payDate;

    @Schema(description = "交易金额，单位分")
    private Integer payMoney;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "创建人ID")
    @TableField(fill = FieldFill.INSERT)
    private Long createId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "修改人ID，（上传发票人id）")
    @TableField(fill = FieldFill.UPDATE)
    private Long updateId;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

}

